package com.xdtech.transportation.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.xdtech.core.model.BaseModel;

/**
 * 
 * @author max.zheng
 * @create 2015-03-17 11:12:47
 * @since 1.0
 * @see 
 */
@Entity
@Table(name="TRAN_ORDER")
public class TranOrder extends BaseModel implements Serializable{
	private static final long serialVersionUID = 1L;
	@Id
	@Column(name = "ID")
	@GeneratedValue(strategy = GenerationType.AUTO)
	private Long id;
	@Column(name="ORDER_NO")
	private String orderNo;
	@Column(name="END_PLACE")
	private String endPlace;
	@Column(name="START_PLACE")
	private String startPlace;
	@Column(name="CONSIGNEE")
	private String consignee;
	@Column(name="CONTACT_NUM")
	private String contactNum;
	
	@ManyToOne
	@JoinColumn(name="DRIVER_ID")
	private TranDriver tranDriver;

	public void setId(Long id) {
		this.id = id;
	}
	public Long getId() {
		return id;
	}
	public void setOrderNo(String orderNo) {
		this.orderNo = orderNo;
	}
	public String getOrderNo() {
		return orderNo;
	}
	public void setEndPlace(String endPlace) {
		this.endPlace = endPlace;
	}
	public String getEndPlace() {
		return endPlace;
	}
	public void setStartPlace(String startPlace) {
		this.startPlace = startPlace;
	}
	public String getStartPlace() {
		return startPlace;
	}
	public void setConsignee(String consignee) {
		this.consignee = consignee;
	}
	public String getConsignee() {
		return consignee;
	}
	public void setContactNum(String contactNum) {
		this.contactNum = contactNum;
	}
	public String getContactNum() {
		return contactNum;
	}
	public TranDriver getTranDriver()
	{
		return tranDriver;
	}
	public void setTranDriver(TranDriver tranDriver)
	{
		this.tranDriver = tranDriver;
	}
}
